{% extends 'base.html' %}

{# 页面标题 #}
{% block title %}时间轴{% endblock %}
{% block timeline %}active{% endblock %}

{# 加载css样式 #}
{% load staticfiles %}

{% block header_extends %}
    <link rel="stylesheet" href="{% static 'blog/blog.css' %}">
    <link rel="stylesheet" href="{% static 'blog/timeline.css' %}">
{% endblock %}


{# 页面内容 #}
{% block content %}
<table class="table table-hover table-bordered">
    <thead>
        <tr>
            <th>博客更新</th>
            <th>更新时间</th>
            <th>更新类型</th>
            <th>标题</th>
        </tr>
    </thead>
    <tbody>
        {% for blog in blogs %}
            <tr>
                <th scope="row">第{{ blog.id }}篇文档</th>
                <td>{{ blog.created_time | date:"Y-m-d" }}</td>
                <td>{{ blog.blog_type }}</td>
                <td>{{ blog.title }}</td>
            </tr>
        {% empty %}
        <h3>-- 暂无博客，敬请期待 --</h3>
        {% endfor %}    
    </tbody>
</table>

{% endblock %}

{% block script_extends %}
{% endblock %}